*{ This template lists all plans in an plan list, the result may vary based on mode }*

<div class="plans">
#{list items:_plans, as:'plan'}

	<div class="plan">
		<a href="@{Plans.viewPlan(plan.id)}"> <h3 class="name">${plan.name}</h3> </a>
		#{if _mode == 'normal' } 
		<div class="items">
			#{list items:plan.items, as:'item'}
				<li>
				<h4>${item.title}</h4> | ${item.dateAndTime}
				<blockquote>${item.content}</blockquote>
				</li>
			#{/list}
			#{else} there are no items in this plan #{/else}
		</div>
		#{/if}
	</div>

#{/list}
#{else} 
#{if _mode == 'search' }<br /> no Plan was found that matches your search criteria #{/if}
#{if _mode == 'normal' } There are no Plans to display #{/if}
#{/else}
</div>